home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Programming / gcc-2.95.3-3 / info / chill.info next >
Encoding:
GNU Info File  |  2001-07-15  |  37.9 KB  |  1,060 lines

  1. This is Info file ch/chill.info, produced by Makeinfo version 1.68 from
  2. the input file ./ch/chill.texi.
  3.  
  4. START-INFO-DIR-ENTRY
  5. * Chill::                       Chill compiler
  6. END-INFO-DIR-ENTRY
  7.  
  8. 
  9. File: chill.info,  Node: Top,  Next: Options,  Up: (dir)
  10.  
  11.  
  12.  
  13. * Menu:
  14.  
  15. * Options::               Compiler options
  16. * Missing::               Unimplemented parts of the Chill language
  17. * Enhancements::          GNU-specific enhancements to the Chill language
  18. * Conversions::           Value and location conversions
  19. * Separate compilation::  Separate compilation
  20. * Differences::           Differences between GNUCHILL and Z.200/1988
  21. * Directives::            Implemented Compiler Directives
  22. * References::            Language definition references
  23.  
  24. 
  25. File: chill.info,  Node: Options,  Next: Missing,  Prev: Top,  Up: Top
  26.  
  27. Compiler options
  28. ****************
  29.  
  30.    Invoking the compiler:
  31.  
  32.    The GNU CHILL compiler supports several new command line options, and
  33. brings a new use to another:
  34.  
  35. `-lang-chill'
  36.      This option instructs gcc that the following file is a CHILL
  37.      source file, even though its extension is not the default `.ch'.
  38.  
  39. `-flocal-loop-counter'
  40.      The CHILL compiler makes a separate reach, or scope, for each DO
  41.      FOR loop.  If `-flocal-loop-counter' is specified, the loop
  42.      counter of value enumeration and location enumeration is
  43.      automatically declared inside that reach.  This is the default
  44.      behavior, required by Z.200.
  45.  
  46. `-fno-local-loop-counter'
  47.      When this option is specified, the above automatic declaration is
  48.      not performed, and the user must declare all loop counters
  49.      explicitly.
  50.  
  51. `-fignore-case'
  52.      When this option is specified, the compiler ignores case. All
  53.      identifiers are converted to lower case. This enables the usage of
  54.      C runtime libraries.
  55.  
  56. `-fno-ignore-case'
  57.      Ignoring the case of identifiers is turned off.
  58.  
  59. `-fruntime-checking'
  60.      The CHILL compiler normally generates code to check the validity
  61.      of expressions assigned to variables or expressions passed as
  62.      parameters to procedures and processes, if those expressions
  63.      cannot be checked at compile time.  This is the default behavior,
  64.      required by Z.200.  This option allows you to re-enable the
  65.      default behavior after disabling it with the
  66.      `-fno-runtime-checking' option.
  67.  
  68. `-fno-runtime-checking'
  69.      The CHILL compiler normally generates code to check the validity
  70.      of expressions assigned to variables, or expressions passed as
  71.      parameters to procedures and processes.  This option allows you to
  72.      disable that code generation.  This might be done to reduce the
  73.      size of a program's generated code, or to increase its speed of
  74.      execution.  Compile time range-checking is still performed.
  75.  
  76. `-fgrant-only'
  77. `-fchill-grant-only'
  78.      This option causes the compiler to stop successfully after
  79.      creating the grant file specified by the source file (see modular
  80.      programming in CHILL).  No code is generated, and many categories
  81.      of errors are not reported.
  82.  
  83. `-fold-string'
  84.      Implement the semantics of Chill 1984 with respect to strings:
  85.      String indexing yields a slice of length one;  CHAR is similar to
  86.      CHAR(1) (or CHARS(1)); and BOOL is similar to BIT(1) (or BOOLS(1)).
  87.  
  88. `-fno-old-string'
  89.      Don't implement 1984 Chill string semantics.  This is the default.
  90.  
  91. `-ISEIZE_PATH'
  92.      This directive adds the specified seize path to the compiler's
  93.      list of paths to search for seize files.  When processing a
  94.      USE_SEIZE_FILE directive, the compiler normally searches for the
  95.      specified seize file only in the current directory.  When one or
  96.      more seize paths are specified, the compiler also searches in
  97.      those directories, in the order of their specification on the
  98.      command line, for the seize file.
  99.  
  100. `-c'
  101.      This C-related switch, which normally prevents gcc from attempting
  102.      to link, is *not* yet implemented by the `chill' command, but you
  103.      can use the `gcc' command with this flag.
  104.  
  105. 
  106. File: chill.info,  Node: Missing,  Next: Enhancements,  Prev: Options,  Up: Top
  107.  
  108. Implemented and missing parts of the Chill language
  109. ***************************************************
  110.  
  111.    The numbers in parentheses are Z.200(1988) section numbers.
  112.  
  113.    * The FORBID keyword in a GRANT statement is currently ignored.
  114.  
  115.    * A CASE action or expression allows only a single expression in a
  116.      case selector list (5.3.2, 6.4).
  117.  
  118.    * ROW modes are not implemented (3.6.3, 3.13.4).
  119.  
  120.    * Due to the absence of ROW modes, DYNAMIC has no meaning in
  121.      connection with access and text modes.
  122.  
  123.    * Array and structure layout (PACK, POS, NOPACK, STEP keywords) is
  124.      ignored (3.12.6).
  125.  
  126.    * Bit-string slices are not implemented.
  127.  
  128.    * The support for synchronization modes and concurrent execution is
  129.      slightly non-standard.
  130.  
  131.    * Exception handling is implemented, but exceptions are not
  132.      generated in all of the required situations.
  133.  
  134.    * Dynamic modes are not implemented (though string slices should
  135.      work).
  136.  
  137.    * Reach-bound initializations are not implemented (4.1.2).
  138.  
  139. 
  140. File: chill.info,  Node: Enhancements,  Next: Conversions,  Prev: Missing,  Up: Top
  141.  
  142. GNU-specific enhancements to the Chill language
  143. ***********************************************
  144.  
  145.    * Grantfiles.  See *Note Separate compilation::.
  146.  
  147.    * Precisions.  Multiple integer and real precisions are supported,
  148.      as well as signed and unsigned variants of the integer modes.
  149.  
  150.    * DESCR built-in. The new built-in function DESCR ( <descriptor
  151.      argument> ) returns a pointer to STRUCT( addr PTR, length ULONG )
  152.      where <descriptor argument> can be anything the compiler can
  153.      handle but at least a location of any mode (except synchronizing
  154.      modes) and any character string or powerset value.  (A temporary
  155.      location within the current stack frame may be allocated if an
  156.      expression is used.)
  157.  
  158.      CHILL does not permit the writing of procedures with parameters of
  159.      any type. Yet some interfaces--in particular those to system
  160.      calls--require the handling of a wide range of modes, e.g. any
  161.      string mode, any structure mode, or any powerset mode. This could
  162.      be handled by specifying two parameters (PTR, INT for the length)
  163.      but this is error-prone (no guarantee the same location is used
  164.      after in ADDR and LENGTH), and it will not be possible for
  165.      expressions.
  166.  
  167.      Caveats: This feature permits the programmer to obtain the address
  168.      of a literal (if the compiler takes this shortcut--see 1st example
  169.      below).  If hardware features protect constant parts of the
  170.      program, erronous abuse will be detected.
  171.  
  172.          Examples:        OFFER_HANDLER( descr("dbs"), ->dbs);
  173.  
  174.             SYNMODE m_els = SET( ela, elb, elc );        SYNMODE
  175.      m_elsel = POWERSET m_els;        DCL user_buf STRUCT( a mx, b my,
  176.      c mz);        DCL select POWERSET m_elsel;
  177.  
  178.             select := m_elsel[LOWER(m_els) : UPPER(m_els)];
  179.  
  180.             GET_RECORD( relation, recno, descr(user_buf), descr(select)
  181.      );
  182.  
  183.             PUT_RECORD( relation, recno, descr(user_buf.b),
  184.      descr(m_elsel[elb]) );
  185.  
  186.    * LENGTH built-in on left-hand-side.       The LENGTH built-in may be
  187.      used on the left-hand-side of an assignment, where its argument is
  188.      a VARYING character string.
  189.  
  190. 
  191. File: chill.info,  Node: Conversions,  Next: Separate compilation,  Prev: Enhancements,  Up: Top
  192.  
  193. Value and location conversions
  194. ******************************
  195.  
  196.    Value and location conversions are highly dependent on the target
  197. machine.  They are also very loosely specified in the 1988 standard.
  198. (The 1992 standard seems an improvement.)
  199.  
  200.    The GNU Chill compiler interprets `MODE(EXP)' as follows:
  201.  
  202.    * If EXP is a referable location, and the size of (the mode of) EXP
  203.      is the same as the size of MODE, a location conversion is used.
  204.      It is implemented exactly as:  `(REFMODE(-> EXP))->', where
  205.      REFMODE is a synmode for `REF MODE'.
  206.  
  207.      The programmer is responsible for making sure that alignment
  208.      restrictions on machine addresses are not violated.
  209.  
  210.      If both MODE and the mode of EXP are discrete modes, alignment
  211.      should not be a problem, and we get the same conversion as a
  212.      standard value conversion.
  213.  
  214.    * If EXP is a constant, and the size of (the mode of) EXP is the
  215.      same as the size of MODE, then a value conversion is performed.
  216.      This conversion is done at compile time, and it has not been
  217.      implemented for all types.  Specifically, converting to or from a
  218.      floating-point type is not implemented.
  219.  
  220.    * If both MODE and the mode of EXP are discrete modes, then a value
  221.      conversion is performed, as described in Z.200.
  222.  
  223.    * If both MODE and the mode of EXP are reference modes, then a value
  224.      conversion is allowed.  The same is true is one mode is a
  225.      reference mode, and the other is an integral mode of the same size.
  226.  
  227. 
  228. File: chill.info,  Node: Separate compilation,  Next: Differences,  Prev: Conversions,  Up: Top
  229.  
  230. Separate compilation
  231. ********************
  232.  
  233.    The GNU CHILL compiler supports modular programming.  It allows the
  234. user to control the visibility of variables and modes, outside of a
  235. MODULE, by the use of GRANT and SEIZE directives.  Any location or mode
  236. may be made visible to another MODULE by GRANTing it in the MODULE
  237. where it is defined, and SEIZEing it in another MODULE which needs to
  238. refer to it.
  239.  
  240.    When variables are GRANTed in one or more modules of a CHILL source
  241. file, the compiler outputs a grant file, with the original source file
  242. name as the base name, and the extension `.grt'.  All of the variables
  243. and modes defined in the source file are written to the grant file,
  244. together with any use_seize_file directives, and the GRANT directives.
  245. A grant file is created for every such source file, except if an
  246. identical grant file already exists.  This prevents unnecessary
  247. makefile activity.
  248.  
  249.    The referencing source file must:
  250.  
  251.   1. specify the grant file in a use_seize_file directive, and
  252.  
  253.   2. SEIZE each variable or mode definition that it needs.
  254.  
  255.    An attempt to SEIZE a variable or mode which is not GRANTed in some
  256. seize file is an error.
  257.  
  258.    An attempt to refer to a variable which is defined in some seize
  259. file, but not explicitly granted, is an error.
  260.  
  261.    An attempt to GRANT a variable or mode which is not defined in the
  262. current MODULE is an error.
  263.  
  264.    Note that the GNU CHILL compiler will *not* write out a grant file
  265. if:
  266.  
  267.    * there are no GRANT directives in the source file, or
  268.  
  269.    * the entire grant file already exists, and is      identical to the
  270.      file which the compiler has just built.  (This latter "feature"
  271.      may be removed at some point.)
  272.  
  273.    Otherwise, a grant file is an automatic, unsuppressable result of a
  274. successful CHILL compilation.
  275.  
  276.    A future release will also support using remote spec modules in a
  277. similar (but more Blue Book-conforming) manner.
  278.  
  279. 
  280. File: chill.info,  Node: Differences,  Next: Directives,  Prev: Separate compilation,  Up: Top
  281.  
  282. Differences to Z.200/1988
  283. *************************
  284.  
  285.    This chapter lists the differences and extensions between GNUCHILL
  286. and the CCITT recommendation Z.200 in its 1988 version (reffered to as
  287. Z.200/1988).
  288.  
  289.    * 2.2 Vocabulary
  290.      The definition of <simple name string> is changed to:
  291.  
  292.           <simple name string> ::=
  293.                {<letter> | _ } { <letter> | <digit | _ }
  294.  
  295.    * 2.6 Compiler Directives
  296.      Only one directive is allowed between the compiler directive
  297.      delimiters `<>' and `<>' or the end-of-line, i.e.
  298.           <> USE_SEIZE_FILE "foo.grt" <>
  299.           <> ALL_STATIC_OFF
  300.  
  301.    * 3.3 Modes and Classes
  302.      The syntax of <mode> is changed to:
  303.  
  304.           <mode> ::=
  305.                  [READ] <non-composite-mode>
  306.                | [READ] composite-mode>
  307.           
  308.           <non-composite-mode> ::=
  309.                  <discrete mode>
  310.                | <real modes>
  311.                | <powerset modes>
  312.                | <reference mode>
  313.                | <procedure mode>
  314.                | <instance mode>
  315.                | <synchronization mode>
  316.                | <timing mode>
  317.  
  318.    * 3.4 Discrete Modes
  319.      The list of discrete modes is enhanced by the following modes:
  320.  
  321.           BYTE         8-bit signed integer
  322.           UBYTE        8-bit unsigned integer
  323.           UINT         16-bit unsigned integer
  324.           LONG         32-bit signed integer
  325.           ULONG        32-bit unsigned integer
  326.  
  327.      *Please note* that INT is implemented as 16-bit signed integer.
  328.  
  329.    * 3.4.6 Range Modes
  330.      The mode BIN(n) is not implemented. Using INT(0 : 2 ** n - 1)
  331.      instead of BIN(n) makes this mode unneccessary.
  332.  
  333.    * 3.X Real Modes
  334.      Note: This is an extension to Z.200/1988, however, it is defined in
  335.      Z.200/1992.
  336.  
  337.      syntax:
  338.  
  339.           <real mode> ::=
  340.                <floating point mode>
  341.  
  342.      semantics:
  343.  
  344.           A real mode specifies a set of numerical values which approximate a
  345.           contiguous range of real numbers.
  346.  
  347.    * 3.X.1 Floating point modes
  348.      syntax:
  349.  
  350.           <floating point mode> ::=
  351.                <floating point mode name
  352.  
  353.      predefined names:
  354.  
  355.      The names REAL and LONG_REAL are predefined as floating point mode
  356.      names.
  357.  
  358.      semantics:
  359.  
  360.      A floating point mode defines a set of numeric approximations to a
  361.      range of real values, together with their minimum relative
  362.      accuracy, between implementation defined bounds, over which the
  363.      usual ordering and arithmetic operations are defined. This set
  364.      contains only the values which can be represented by the
  365.      implementation.
  366.  
  367.      examples:
  368.  
  369.           REAL
  370.           LONG_REAL
  371.  
  372.    * 3.6 Reference Modes
  373.      Row modes are not implemeted at all.
  374.  
  375.    * 3.7 Procedure Mode
  376.      The syntax for procedure modes is changed to:
  377.  
  378.           <procedure mode> ::=
  379.                  PROC ([<parameter list>]) [ <result spec> ]
  380.                  [EXCEPTIONS(<exception list>)] [RECURSIVE]
  381.                | <procedure mode name>
  382.           
  383.           <parameter list> ::=
  384.                <parameter spec> {, <parameter spec> } *
  385.           
  386.           <parameter spec> ::=
  387.                <mode> [ <parameter attribute> ]
  388.           
  389.           <parameter attribute> ::=
  390.                IN | OUT | INOUT | LOC
  391.           
  392.           <result spec> ::=
  393.                RETURNS ( <mode> [LOC])
  394.           
  395.           <exception list> ::=
  396.                <exception name> {, <exception name> } *
  397.  
  398.    * 3.10 Input-Output Modes
  399.      Due to the absence of row modes, DYNAMIC has no meaning in an
  400.      access or text mode definition.
  401.  
  402.    * 3.12.2 String Modes
  403.      As <string modes> were defined differently in Z.200/1984, the
  404.      syntax of <string mode> is changed to:
  405.  
  406.           <string mode> ::=
  407.                  <string type> ( <string length> ) [ VARYING ]
  408.                | <parametrized string mode>
  409.                | <string mode name>
  410.           
  411.           <parameterized string mode> ::=
  412.                  <origin string mode name> ( <string length> )
  413.                | <parameterized string mode name>
  414.           
  415.           <origin string mode name> ::=
  416.                <string mode name>
  417.           
  418.           string type
  419.                  BOOLS
  420.                | BIT
  421.                | CHARS
  422.                | CHAR
  423.           
  424.           <string length> ::=
  425.                <integer literal expression>
  426.  
  427.      VARYING is not implemented for <string type> BIT and BOOL.
  428.  
  429.    * 3.11.1 Duration Modes
  430.      The predefined mode DURATION is implemented as a NEWMODE ULONG and
  431.      holds the duration value in miliseconds. This gives a maximum
  432.      duration of
  433.  
  434.           MILLISECS (UPPER (ULONG)),
  435.           SECS (4294967),
  436.           MINUTES (71582),
  437.           HOURS (1193), and
  438.           DAYS (49).
  439.  
  440.    * 3.11.2 Absolute Time Modes
  441.      The predefined mode TIME is implemented as a NEWMODE ULONG and
  442.      holds the absolute time in seconds since Jan. 1st, 1970. This is
  443.      equivalent to the mode `time_t' defined on different systems.
  444.  
  445.    * 3.12.4 Structure Modes
  446.      Variant fields are allowed, but the CASE-construct may define only
  447.      one tag field (one dimensional CASE). OF course, several variant
  448.      fields may be specified in one STRUCT mode. The tag field will
  449.      (both at compile- and runtime) not be interpreted in any way,
  450.      however, it must be interpreted by a debugger. As a consequence,
  451.      there are no parameterized STRUCT modes.
  452.  
  453.    * 3.12.5 Layout description for array and structure modes
  454.      STEP and POS is not implemeted at all, therefore the syntax of
  455.      <element layout and field layout is changed to:
  456.  
  457.           <element layout> ::=
  458.                PACK | NOPACK
  459.           
  460.           <field layout> ::=
  461.                PACK | NOPACK
  462.  
  463.    * 3.13.4 Dynamic parameterised structure modes
  464.      Dynamic parameterised structure modes are not implemented.
  465.  
  466.    * 4.1.2 Location declaration
  467.      The keyword STATIC is allowed, but has no effect at module level,
  468.      because all locations declared there are assumed to be `static' by
  469.      default. Each granted location will become `public'. A `static'
  470.      declaration inside a block, procedure, etc. places the variable in
  471.      the data section instead of the stack section.
  472.  
  473.    * 4.1.4 Based decleration
  474.      The based declaration was taken from Z.200/1984 and has the
  475.      following syntax:
  476.  
  477.      syntax:
  478.  
  479.           <based declaration> ::=
  480.                <defining occerrence list> <mode> BASED
  481.                ( <free reference location name> )
  482.  
  483.      semantics:
  484.  
  485.      A based declaration with <free reference location name> specifies
  486.      as many access names as are defining occerrences in the defining
  487.      occurrence list. Names declared in a base declaration serve as an
  488.      alternative way accessing a location by dereferencing a reference
  489.      value. This reference value is contained in the location specified
  490.      by the free reference location name. This dereferencing operation
  491.      is made each time and only when an access is made via a declared
  492.      based name.
  493.  
  494.      static properties:
  495.  
  496.      A defining occurrence in a based declaration with free reference
  497.      location name defines a based name. The mode attached to a based
  498.      name is the mode specified in the based declaration. A based name
  499.      is referable.
  500.  
  501.    * 4.2.2 Access names
  502.      The syntax of access names is changed to:
  503.  
  504.           <access name> ::=
  505.                  <location name>
  506.                | <loc-identity name>
  507.                | <based name>
  508.                | <location enumeration name>
  509.                | <location do-with name>
  510.  
  511.      The semantics, static properties and dynamic conditions remain
  512.      unchanged except that they are enhanced by base name.
  513.  
  514.    * 5.2.4.1 Literals General
  515.      The syntax of <literal> is change to:
  516.  
  517.           <literal> ::=
  518.                  <integer literal>
  519.                | <boolean literal>
  520.                | <charater literal>
  521.                | <set literal>
  522.                | <emptiness literal>
  523.                | <character string literal>
  524.                | <bit string literal>
  525.                | <floating point literal>
  526.  
  527.      Note: The <floating point literal> is an extension to Z.200/1988
  528.      and will be described later on.
  529.  
  530.    * 5.2.4.2 Integer literals
  531.      The <decimal integer literal> is changed to:
  532.  
  533.           <decimal integer literal> ::=
  534.                  { D | d } ' { <digit> | _ } +
  535.                | <digit> { <digit> | _ } *
  536.  
  537.    * 5.2.4.4 Character literals
  538.      A character literal, e.g. 'M', may serve as a charater string
  539.      literal of length 1.
  540.  
  541.    * 5.2.4.7 Character string literals
  542.      The syntax of a character string literal is:
  543.  
  544.           <character string literal> ::=
  545.                  '{ <non-reserved character> | <single quote> |
  546.                  <control sequence> } * '
  547.                | '{ <non-reserved character> | <double quote> |
  548.                  <control sequence> } * '
  549.           
  550.           <single quote> ::=
  551.                "
  552.           
  553.           <double quote> ::=
  554.                ""
  555.  
  556.      A character string litaral of length 1, enclosed in apostrophes
  557.      (e.g. 'M') may also serve as a charater literal.
  558.  
  559.    * 5.2.4.9 Floating point literal
  560.      Note: This is an extension to Z.200/1988 ans was taken from
  561.      Z.200/1992.
  562.  
  563.      syntax:
  564.  
  565.           <floating point literal> ::=
  566.                  <unsigned floating point literal>
  567.                | <signed floating point literal>
  568.           
  569.           <unsigned floating point literal> ::=
  570.                  <digit sequence> . [ <digit sequence> ] [ <exponent> ]
  571.                | [ <digit sequence> ] . <digit sequence> [ <exponent> ]
  572.           
  573.           <signed floating point literal> ::=
  574.                - <unsigned floating point literal>
  575.           
  576.           <digit sequence> ::=
  577.                <digit> { <digit> | _ } *
  578.           
  579.           <exponent> ::=
  580.                  [ E | D | e | d ] <digit sequence>
  581.                | [ E | D | e | d ] - <digit sequence>
  582.  
  583.    * 5.2.14 Start Expression
  584.      The START expression is not implemented.
  585.  
  586.    * 5.3 Values and Expressions
  587.      The undefined value, denoted by `*', is not implemented.
  588.  
  589.    * 5.3.8 Operand-5
  590.      The <string repetition operator> is defined as:
  591.  
  592.           <string repetition operator> ::=
  593.                (<integer expression>)
  594.  
  595.    * 6.4 Case Action
  596.      There may be only one case selector specified. The optional range
  597.      list must not be specified.
  598.  
  599.    * 6.5 Do Action
  600.      A Do-Action without control part is not implemented. Grouping of
  601.      statements can be achieved via BEGIN and END. A location
  602.      enumeration is not allowed for BIT strings, only for (varying)
  603.      CHAR strings and ARRAYs.
  604.  
  605.      The expression list in a DO WITH must consist of locations only.
  606.  
  607.    * 6.13 Start Action
  608.      The syntax of the START action is changed to:
  609.  
  610.           <start action> ::=
  611.                START <process name> (<copy number> [, <actual parameter list>])
  612.                [ SET <instance location> ]
  613.           
  614.           <copy number> ::=
  615.                <integer expression>
  616.  
  617.    * 6.16 Delay Action
  618.      The optional PRIORITY specification need not be a constant.
  619.  
  620.    * 6.17 Delay Case Action
  621.      The optional SET branch and the, also optional, PRIORITY branch
  622.      must be seperated by `;'.
  623.  
  624.    * 6.18 Send Action
  625.      The send action must define a destination instance (via the TO
  626.      branch), since undirected signals are not supported. The optional
  627.      PRIORITY specification need not be a constant. Additional to the
  628.      data transported by the signal, there will be a user defined
  629.      argument.
  630.  
  631.      The syntax of the <send signal action> is therefore:
  632.  
  633.           <send signal action> ::=
  634.                SEND <signal name> [ ( <value> {, <value> } * ) ]
  635.                [ WITH <expression> ]
  636.                TO <instance primitive value> [ <priority> ]
  637.  
  638.      The default priority can be specified by the compiler directive
  639.      SEND_SIGNAL_DEFAULT_PRIORITY. If this also is omitted, the default
  640.      priority is 0.
  641.  
  642.    * 6.20.3 CHILL value built-in calls
  643.      The CHILL value buit-in calls are enhanced by some calls, and
  644.      other calls will have different arguments as described in
  645.      Z.200/1988. Any call not mentioned here is the same as described
  646.      in Z.200/1988.
  647.  
  648.      syntax:
  649.  
  650.           CHILL value built-in routine call> ::=
  651.                  ADDR (<location>)
  652.                | PRED (<pred succ argument>)
  653.                | SUCC (<pred succ argument>)
  654.                | ABS (<numeric expression>)
  655.                | LENGTH (<length argument>)
  656.                | SIN (<floating point expression>)
  657.                | COS (<floating point expression>)
  658.                | TAN (<floating point expression>)
  659.                | ARCSIN (<floating point expression>)
  660.                | ARCCOS (<floating point expression>)
  661.                | ARCTAN (<floating point expression>)
  662.                | EXP (<floating point expression>)
  663.                | LN (<floating point expression>)
  664.                | LOG (<floating point expression>)
  665.                | SQRT (<floating point expression>)
  666.                | QUEUE_LENGTH (<buffer location> | <event location>)
  667.                | GEN_INST (<integer expression> | <process name> ,
  668.                               <integer expression>)
  669.                | COPY_NUMBER (<instance expression>)
  670.                | GEN_PTYE (<process name>)
  671.                | PROC_TYPE (<instance expression>)
  672.                | GEN_CODE (<process name> | <signal name>)
  673.                | DESCR (<location>)
  674.           
  675.           <pred succ argument> ::=
  676.                  <discrete expression>
  677.                | <bound reference expression>
  678.           
  679.           <numeric expression> ::=
  680.                  <integer expression>
  681.                | floating point expression>
  682.           
  683.           <length argument> ::=
  684.                  <string location>
  685.                | <string expression>
  686.                | <string mode name>
  687.                | <event location>
  688.                | <event mode name>
  689.                | <buffer location>
  690.                | <buffer mode name>
  691.                | <text location>
  692.                | <text mode name>
  693.  
  694.      semantics:
  695.  
  696.      ADDR is derived syntax for -> <location>.
  697.  
  698.      PRED and SUCC delivers respectively, in case of a discrete
  699.      expression, the next lower or higher discrete value of their
  700.      argument, in case of bound reference expression these built-in
  701.      calls deliver a pointer to the previous or next element.
  702.  
  703.      ABS is defined on numeric values, i.e. integer values and floating
  704.      point values, delivering the corresponding absolute value.
  705.  
  706.      LENGTH is defined on
  707.  
  708.         * string and text locations and string expressions, delivering
  709.           the length of them;
  710.  
  711.         * event locations, delivering the event length of the mode of
  712.           the location;
  713.  
  714.         * buffer locations, delivering the buffer length of the mode of
  715.           the location;
  716.  
  717.         * string mode names, delivering the string length of the mode;
  718.  
  719.         * text mode names, delivering the text length of the mode;
  720.  
  721.         * buffer mode names, delivering the buffer length of the mode;
  722.  
  723.         * event mode names, delivering the event length of the mode;
  724.  
  725.         * Additionally, LENGTH also may be used on the left hand side
  726.           of an assignment to set a new length of a varying character
  727.           string location. However, to avoid undefined elements in the
  728.           varying string, the new length may only be less or equal to
  729.           the current length.  Otherwise a RANGEFAIL exception will be
  730.           generated.
  731.  
  732.      SIN delivers the sine of its argument (interpreted in radians).
  733.  
  734.      COS delivers the cosine of its argument (interpreted in radians).
  735.  
  736.      TAN delivers the tangent of its argument (interpreted in radians).
  737.  
  738.      ARCSIN delivers the sin -1 function of its argument.
  739.  
  740.      ARCCOS delivers the cos -1 function of its argument.
  741.  
  742.      ARCTAN delivers the tan -1 function of its argument.
  743.  
  744.      EXP delivers the exponential function, where x is the argument.
  745.  
  746.      LN delivers the natural logarithm of its argument.
  747.  
  748.      LOG delivers the base 10 logarithm of its argument.
  749.  
  750.      SQRT delivers the sqare root of its argument.
  751.  
  752.      QUEUE_LENGTH delivers either the number of sending delayed
  753.      processes plus the number of messages in a buffer queue (if the
  754.      argument is a buffer location), or the number of delayed processes
  755.      (if the argument specifies an event location) as integer
  756.      expression.
  757.  
  758.      GEN_INST delivers an instance expression constructed from the
  759.      arguments. Both arguments must have the &INT-derived class.
  760.  
  761.      COPY_NUMBER delivers as &INT-derived class the copy number of an
  762.      instance location.
  763.  
  764.      GEN_PTYPE delivers as &INT-derived class the associated number of
  765.      the process name.
  766.  
  767.      PROC_TYPE delivers as &INT-derived class the process type of an
  768.      instance expression.
  769.  
  770.      GEN_CODE delivers as &INT-derived class the associated number of
  771.      the process name or signal name.
  772.  
  773.      DESCR delivers a free reference expression pointing to a structure
  774.      with the following layout describing the location argument.
  775.  
  776.           SYNMODE __tmp_descr = STRUCT (p PTR, l ULONG);
  777.  
  778.    * 7.4.2 Associating an outside world object
  779.      The syntax of the associate built-in routine call is defined as:
  780.  
  781.           <associate built-in routine call> ::=
  782.                ASSOCIATE ( <association location>, <string expression>, [, <string expression> ] )
  783.  
  784.      The ASSOCIATE call has two parameters besides the association
  785.      location: a pathname and an optional mode string.
  786.  
  787.      The value of the first string expression must be a pathname
  788.      according to the rules of the underlying operating system. (Note
  789.      that a relative pathname implies a name relative to the working
  790.      directory of the process.)
  791.  
  792.      The mode string may contain the value "VARIABLE", which requests
  793.      an external representation of records consisting of an UINT record
  794.      length followed by as many bytes of data as indicated by the
  795.      length field.  Such a file with variable records is not indexable.
  796.  
  797.      A file with variable records can be written using any record mode.
  798.      If the record mode is CHARS(n) VARYING, the record length is equal
  799.      to the actual length of the value written.  (Different record may
  800.      have differing lengths.)  With all other record modes, all records
  801.      written using the same access mode will have the same length, but
  802.      will still be prefixed with the length field.  (Note that by
  803.      re-connecting with different access modes, the external
  804.      representation may ultimately contain records with differing
  805.      lengths.)
  806.  
  807.      A file with variable records can only be read by using a record
  808.      mode of CHARS(n) VARYING.
  809.  
  810.    * 7.4.2 Accessing association attributes
  811.      The value of the READABLE and WRITEABLE attributes is determined
  812.      using the file status call provided by the operating system.  The
  813.      result will depend on the device being accessed, or on the file
  814.      mode.
  815.  
  816.      The INDEXABLE attribute has the value false for files with
  817.      variable records, and for files associated with devices not
  818.      supporting random positioning (character devices, FIFO special
  819.      files, etc.).
  820.  
  821.      The variable attribute is true for files associated with the mode
  822.      sting "VARIABLE", and false otherwise.
  823.  
  824.    * 7.4.5 Modifying association attributes
  825.      The syntax of the MODIFY built-in routine call is defined as:
  826.  
  827.           <modify built-in call> ::=
  828.                MODIFY ( <association location>, <string expression> )
  829.  
  830.      At present, MODIFY accepts a character string containing a pathname
  831.      in addition to the association location, which will cause a
  832.      renaming of the associated file.
  833.  
  834.    * 7.4.9 Data transfer operations
  835.      READRECORD will fail (causing READFAIL) if the number of bytes
  836.      from the current position in the file to the end of the file is
  837.      greater than zero but less than the size of the record mode, and
  838.      no data will be transferred.  (If the number of bytes is zero, no
  839.      error occurs and OUTOFFILE will return TRUE.)
  840.  
  841.      The number of bytes transferred by READRECORD and WRITERECORD is
  842.      equal to the size of the record mode of the access location. Note
  843.      that the internal representation of this mode may vary depending
  844.      on the record mode being packed or not.
  845.  
  846.    * 7.5 Text Input Output
  847.      Sequential text files will be represented so as to be compatible
  848.      with the standard representation of texts on the underlying
  849.      operating system, where control characters are used to delimit
  850.      text records on files as well as to control the movement of a
  851.      cursor or printing head on a device.
  852.  
  853.      For indexed text files, records of a uniform length (i.e. the size
  854.      of the text record, including the length field) are written.  All
  855.      i/o codes cause an i/o transfer without any carriage control
  856.      characters being added to the record, which will be expanded with
  857.      spaces.
  858.  
  859.      An indexed text file is therefore not compatible with the standard
  860.      text representation of the underlying operating system.
  861.  
  862.    * 7.5.3 Text transfer operations
  863.      The syntax of <text argument> is changed to:
  864.  
  865.           <text argument> ::=
  866.                  <text location>
  867.                | <predefined text location>
  868.                | <varying string location>
  869.           
  870.           <predefined text location> ::=
  871.                  STDIN
  872.                | STDOUT
  873.                | STDERR
  874.  
  875.      NOTE: The identifiers STDIN, STDOUT, and STDERR are predefined.
  876.      Association and connection with files or devices is done according
  877.      to operating system rules.
  878.  
  879.      The effect of using READTEXT or WRITETEXT with a character string
  880.      location as a text argument (i.e. the first parameter) where the
  881.      same location also appears in the i/o list is undefined.
  882.  
  883.      The current implementation of formatting assumes run-to-completion
  884.      semantics of CHILL tasks within an image.
  885.  
  886.    * 7.5.5 Conversion
  887.      Due to the implementation of <floating point modes> the syntax is
  888.      changed to:
  889.  
  890.           <conversion clause> ::=
  891.                <conversion code> { <conversion qualifier } *
  892.                [ <clause width> ]
  893.           
  894.           <conversion code> ::=
  895.                B | O | H | C | F
  896.           
  897.           <conversion qualifier> ::=
  898.                L | E | P<character>
  899.           
  900.           <clause width> ::=
  901.                  { <digit> } + | V
  902.                | <real clause width>
  903.           
  904.           <real clause width> ::=
  905.                { { <digit> + | V } : { { <digit> } + | V }
  906.  
  907.      Note: The <real clause width> is only valid for <conversion code>
  908.      `C' or `F'.
  909.  
  910.    * 7.5.7 I/O control
  911.      To achieve compatibility of text files written with CHILL i/o with
  912.      the standard representation of text on the underlying operating
  913.      system the interpretation of the i/o control clause of the format
  914.      deviates from Z.200. The following table shows the i/o codes
  915.      together with the control characters written before and after the
  916.      text record, to achieve the indicated function:
  917.     `/'
  918.           Write next record (record, line feed)
  919.  
  920.     `+'
  921.           Write record on next page (form feed, record, line feed)
  922.  
  923.     `-'
  924.           Write record on current line (record, carriage return)
  925.  
  926.     `?'
  927.           Write record as a prompt (carriage return, record)
  928.  
  929.     `!'
  930.           Emit record (record).
  931.  
  932.     `='
  933.           Force new page for the next line: The control character
  934.           written before the next record will be form feed,
  935.           irrespective of the i/o control used for transferring the
  936.           record.
  937.  
  938.      When reading a text file containing control characters other than
  939.      line feed, these characters have to be reckoned with by the format
  940.      used to read the text records.
  941.  
  942.    * 11.2.2 Regionality
  943.      Regionality is not implemented at all, so there is no difference
  944.      in the generated code when REGION is substituted by MODULE in a
  945.      GNUCHILL compilation unit.
  946.  
  947.    * 11.5 Signal definition statement
  948.      The <signal definition statement> may only occur at module level.
  949.  
  950.    * 12.3 Case Selection
  951.      The syntax of <case label specification> is changed to:
  952.  
  953.           <case label specification> ::=
  954.                ( <case label> {, <case label> } * )
  955.           
  956.           <case label> ::=
  957.                  <discrete literal expression>
  958.                | <literal range>
  959.                | <discrete mode name>
  960.                | ELSE
  961.  
  962. 
  963. File: chill.info,  Node: Directives,  Next: References,  Prev: Differences,  Up: Top
  964.  
  965. Compiler Directives
  966. *******************
  967.  
  968.    * ALL_STATIC_ON, ALL_STATIC_OFF
  969.      These directives control where procedure local variables are
  970.      allocated. ALL_STATIC_ON turns allocation of procedure local
  971.      variables in the data space ON, regardless of the keyword STATIC
  972.      being used or not.  ALL_STATIC_OFF places procedure local
  973.      variables in the stack space.  The default is ALL_STATIC_OFF.
  974.  
  975.    * RANGE_ON, RANGE_OFF
  976.      Turns generation of rangecheck code ON and OFF.
  977.  
  978.    * USE_SEIZE_FILE <character string literal>
  979.      Specify the filename (as a character string literal) where
  980.      subsequent SEIZE statements are related to. This directive and the
  981.      subsequent SEIZEs are written to a possibly generated grant file
  982.      for this module.
  983.  
  984.           <> USE_SEIZE_FILE "foo.grt" <>
  985.           SEIZE bar;
  986.  
  987.    * USE_SEIZE_FILE_RESTRICTED "filename"
  988.      Same as USE_SEIZE_FILE. The difference is that this directive and
  989.      subsequent SEIZEs are *not* written to a possibly generated grant
  990.      file.
  991.  
  992.    * PROCESS_TYPE = <integer expression>
  993.      Set start value for all PROCESS delclarations. This value
  994.      automatically gets incremented after each PROCESS declaration and
  995.      may be changed with a new PROCESS_TYPE compiler directive.
  996.  
  997.    * SIGNAL_CODE = <integer expression>
  998.      Set start value for all SIGNAL definitions. This value
  999.      automatically gets incremented after each SIGNAL definition and
  1000.      may be changed with a new SIGNAL_CODE compiler directive.
  1001.  
  1002.    * SEND_SIGNAL_DEFAULT_PRIORITY = <integer expression>
  1003.      Set default priority for send signal action.
  1004.  
  1005.    * SEND_BUFFER_DEFAULT_PRIORITY = <integer expression>
  1006.      Set default priority for send buffer action.
  1007.  
  1008.      Note: Every <integer expression> in the above mentioned compiler
  1009.      directives may also be specified by a SYNONYM of an integer type.
  1010.  
  1011.           SYN first_signal_code = 10;
  1012.           <> SIGNAL_CODE = first_signal_code <>
  1013.           SIGNAL s1;
  1014.  
  1015. 
  1016. File: chill.info,  Node: References,  Prev: Directives,  Up: Top
  1017.  
  1018. Language Definition References
  1019. ******************************
  1020.  
  1021.    * CCITT High Level Language (CHILL) Recommendation Z.200
  1022.      ISO/IEC 9496, Geneva 1989                ISBN 92-61-03801-8
  1023.  
  1024.    * An Analytic Description of CHILL, the CCITT high-level
  1025.      language, Branquart, Louis & Wodon, Springer-Verlag 1981
  1026.                                            ISBN 3-540-11196-4
  1027.  
  1028.    * CHILL User's Manual     CCITT, Geneva 1986
  1029.       ISBN 92-61-02601-X
  1030.  
  1031.    * Introduction to CHILL     CCITT, Geneva 1983
  1032.         ISBN 92-61-017771-1
  1033.  
  1034.    * CHILL CCITT High Level Language     Proceedings of the 5th CHILL
  1035.      Conference     North-Holland, 1991                      ISBN 0 444
  1036.      88904 3
  1037.  
  1038.    * Introduction to the CHILL programming Language     TELEBRAS, Campinas,
  1039.      Brazil 1990
  1040.  
  1041.    Z.200 is mostly a language-lawyer's document, but more readable than
  1042. most.  The User's Guide is more readable by far, but doesn't cover the
  1043. whole language.  Our copies of these documents came through Global
  1044. Engineering Documents, in Irvine, CA, USA. (714)261-1455.
  1045.  
  1046.  
  1047. 
  1048. Tag Table:
  1049. Node: Top193
  1050. Node: Options739
  1051. Node: Missing4025
  1052. Node: Enhancements5113
  1053. Node: Conversions7343
  1054. Node: Separate compilation8942
  1055. Node: Differences10952
  1056. Node: Directives35453
  1057. Node: References37503
  1058. 
  1059. End Tag Table
  1060.